#ifndef _IM_CALL_CENTER_DISPATCH_MSG_TASK_H_
#define _IM_CALL_CENTER_DISPATCH_MSG_TASK_H_

#include <string>
#include <boost/asio.hpp>

#include <boost/enable_shared_from_this.hpp>

#include "thread_manager.h"
#include "ImServiceCommon_types.h"

namespace imserver {

using apache::thrift::concurrency::Runnable;

class DispatchMessageTask : public Runnable  {
 public:
  DispatchMessageTask(const ImMessage& message) : message_(message) {}
  virtual void run();

  static void StartIoService();

  void FromShopMessage(const ImMessage& message);
  void ToShopMessage(const ImMessage& message);
 private:
  ImMessage message_;
};

}

#endif // _IM_CALL_CENTER_DISPATCH_MSG_TASK_H_

